Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Add deprecation warning for CA #1244

Open
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

hilmarf
Copy link
Member

@hilmarf hilmarf commented Jan 10, 2025

What this PR does / why we need it

we don't want to support component archives (CA) anymore

Which issue(s) this PR fixes

fixes: #1242

potential follow up: #1254

@github-actions github-actions bot added kind/bugfix Bug area/documentation Documentation related component/ocm-cli OCM Command Line Interface labels Jan 10, 2025
@hilmarf hilmarf added kind/deprecation whenever something gets deprecated and removed area/documentation Documentation related kind/bugfix Bug component/ocm-cli OCM Command Line Interface labels Jan 10, 2025
@github-actions github-actions bot added the size/m Medium label Jan 10, 2025
@hilmarf hilmarf added this to the 2025-Q1 milestone Jan 10, 2025
@hilmarf hilmarf added the kind/chore chore, maintenance, etc. label Jan 10, 2025
@github-actions github-actions bot added kind/bugfix Bug area/documentation Documentation related component/ocm-cli OCM Command Line Interface labels Jan 13, 2025
@hilmarf hilmarf marked this pull request as ready for review January 14, 2025 15:32
@hilmarf hilmarf requested a review from a team as a code owner January 14, 2025 15:32
@hilmarf hilmarf removed the kind/bugfix Bug label Jan 16, 2025
@ikhandamirov
Copy link
Contributor

ikhandamirov commented Jan 17, 2025

If I execute, for example, ocm create ca, I get the warning:

Command "componentarchive" is deprecated, Deprecated - use CommonTransportFormat instead

But componentarchive is not a command. Unfortunately, I didn't find at first glance, how to correct the message.

Edit: it is a command. Though the message looks strange, we'll likely have to live with it.

@ikhandamirov
Copy link
Contributor

Was it really part of #1244, to directly remove all mentions of component archive from the reference? I thought, for now we only wanted to put a disclaimer with a warning.

But I'm not against removing it. I find it a bit inconsistent, but, on the other hand, maybe it is a good motivation for existing user to start thinking of switching to CTF.

Copy link
Contributor

@ikhandamirov ikhandamirov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see my other comments.

@ikhandamirov
Copy link
Contributor

One more place to deprecate:

@hilmarf
Copy link
Member Author

hilmarf commented Jan 17, 2025

If I execute, for example, ocm create ca, I get the warning:

Command "componentarchive" is deprecated, Deprecated - use CommonTransportFormat instead

But componentarchive is not a command. Unfortunately, I didn't find at first glance, how to correct the message.

Edit: it is a command. Though the message looks strange, we'll likely have to live with it.

Cobra-commands do actually have a field, where you can write a string to, marking commands as deprecated. See: https://github.com/hilmarf/ocm/blob/deprecate/ComponentArchive/cmds/ocm/commands/ocmcmds/componentarchive/cmd.go#L24
There are in total three places:
image

@hilmarf
Copy link
Member Author

hilmarf commented Jan 17, 2025

Was it really part of #1244, to directly remove all mentions of component archive from the reference? I thought, for now we only wanted to put a disclaimer with a warning.

But I'm not against removing it. I find it a bit inconsistent, but, on the other hand, maybe it is a good motivation for existing user to start thinking of switching to CTF.

You're right, it's not written as requirement to remove all mentions of component archive. But I don't like to read through anyhow too large documentation and then need to let my brain filter out everything which is deprecated.

@morri-son what's your take on that? Shall we still generate all the documentation around CAs or not?

@hilmarf
Copy link
Member Author

hilmarf commented Jan 17, 2025

One more place to deprecate:

thanks - good catch! I obviously missed to search for component-archive - for whatever reason it's written here with '-'!?!?

@ikhandamirov
Copy link
Contributor

@hilmarf, Commands ocm add sources and ocm add resources are specific to component archives:

So far only component archives are supported as target.

So far those commands are not covered by this PR, if I see it correctly, right? There may be also other commands like this, which I'm not aware of.

@ikhandamirov
Copy link
Contributor

A separate question is, if we remove all information about component archives, do we already have enough documentation on how to achieve the same result with CTF?

@hilmarf
Copy link
Member Author

hilmarf commented Jan 17, 2025

@hilmarf, Commands ocm add sources and ocm add resources are specific to component archives:

So far only component archives are supported as target.

So far those commands are not covered by this PR, if I see it correctly, right? There may be also other commands like this, which I'm not aware of.

yes, that's right - #1254 is the follow up task to be done... or we are faster with the rewrite and skip it ;-)

@hilmarf
Copy link
Member Author

hilmarf commented Jan 17, 2025

A separate question is, if we remove all information about component archives, do we already have enough documentation on how to achieve the same result with CTF?

I don't know. I'm not using CAs.

@morri-son
Copy link
Contributor

A separate question is, if we remove all information about component archives, do we already have enough documentation on how to achieve the same result with CTF?

as mentioned above there are some commands that only work with CAs, but personally I also never used CAs, but only CTFs and think there is enough documentation on using CTFs + component constructors. Only in case someone manually creates components step by step using resource files, he may stumble into this issue. Looking at the documentation these cases are more to explain how to build a component and its different artifacts step by step, not a use case for pipelines.

@ikhandamirov
Copy link
Contributor

@morri-son , please check #1244 (comment)

As you see, @hilmarf suggests to remove documentation for ocm create ca and ocm transfer ca as part of this PR.

  1. Do we want to do this, or do we for now only want to add a deprecation warning to the documentation?
  2. Commands like ocm add sources and ocm add resources are also specific to component archives. Do we want to remove their documentation as well? Or do we want to tag them with FIXME and adapt to CTF with <User Story> - Replace CA usage in resources + download #1254?

@hilmarf hilmarf requested review from morri-son and a team January 17, 2025 14:55
@morri-son
Copy link
Contributor

@morri-son , please check #1244 (comment)

As you see, @hilmarf suggests to remove documentation for ocm create ca and ocm transfer ca as part of this PR.

  1. Do we want to do this, or do we for now only want to add a deprecation warning to the documentation?
  2. Commands like ocm add sources and ocm add resources are also specific to component archives. Do we want to remove their documentation as well? Or do we want to tag them with FIXME and adapt to CTF with - Replace CA usage in resources + download #1254?

I can only share my point of view :-) I do not see a benefit in mentioning CAs anywhere in the docs anymore when we're about to discontinue support for them soon. We will keep it in the code for own purposes, e.g. debugging, but we want to shift end users to CTFs already right now.

Therefore I would also remove ocm add resources and ocm add sources (and potential other commands forcing the use of CAs) from the documentation / website completely instead of having a warning in the docs. Throwing warnings and give recommendations when people use such commands (because they maybe use an older copied version of the docs, which is already highly hypothetical) is the right way, but in the docs I would try to remove all occurrences of the component archives wherever consistently possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/documentation Documentation related component/ocm-cli OCM Command Line Interface kind/bugfix Bug kind/chore chore, maintenance, etc. kind/deprecation whenever something gets deprecated size/m Medium
Projects
None yet
Development

Successfully merging this pull request may close these issues.

<User Story> - Add deprecation warning for CA
3 participants